package com.iplant.ams.serviceImpl.dao.dms.scada;

import com.iplant.ams.service.po.dms.DMSDeviceLedger;
import com.iplant.ams.service.po.dms.scada.alarm.DMSDeviceHisAlarm;
import com.iplant.base.po.OutResult;
import com.iplant.base.po.Pagination;
import com.iplant.base.utils.annotation.dao.DBBaseDAO;
import com.iplant.base.utils.sql.BaseDAO;
import com.iplant.basic.service.po.bms.BMSEmployee;
import lombok.extern.slf4j.Slf4j;

import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@DBBaseDAO(DMSDeviceHisAlarm.class)
@Slf4j
public class DMSDeviceHisAlarmDAO extends BaseDAO {

    private static DMSDeviceHisAlarmDAO Instance = null;

    public static DMSDeviceHisAlarmDAO getInstance() {
        if (Instance == null) {
            Instance = new DMSDeviceHisAlarmDAO();
        }
        return Instance;
    }

    public DMSDeviceHisAlarmDAO() {
        super("");this.Init();
    }

    public List<DMSDeviceHisAlarm> DMS_SelectDeviceHisAlarmList(BMSEmployee wLoginUser,  List<String> wAssetNoList,   String wAlarmCode,
                               int wEventType,int wDataGrad,int wPositionID, Calendar wStartTime, Calendar wEndTime, Pagination wPagination, OutResult<Integer> wErrorCode){
        Map<String,Object> wParams= new HashMap<>();
        wParams.put("AssetNo", wAssetNoList);
        wParams.put("AlarmCode", wAlarmCode);
        wParams.put("DataGrad", wDataGrad);
        wParams.put("PositionID", wPositionID);
        wParams.put("EventType", wEventType);
        wParams.put("StartTime", wStartTime);
        wParams.put("EndTime", wEndTime);
        return this.SelectPOList(wLoginUser, wParams , wPagination, wErrorCode);
    }


}
